{* Smarty *}
{*
 *  This file is part of Urd.
 *
 *  Urd is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  Urd is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. See the file "COPYING". If it does not
 *  exist, see <http://www.gnu.org/licenses/>.
 *
 * $LastChangedDate: 2008-06-14 11:01:35 +0200 (Sat, 14 Jun 2008) $
 * $Rev: 1161 $
 * $Author: styck $
 * $Id: ajax_showtransfers.tpl 1161 2008-06-14 09:01:35Z styck $
 *}
{* Ajax page, doesn't need a head/foot tpl *}

<input type="hidden" id="challenge_usenet" value="{$challenge}"/>
<table class="articles" width="95%">
<tr class="head">
<th>{$LN_usenet_name}</th>
<th>{$LN_usenet_hostname}</th>
<th>{$LN_usenet_port}</th>
<th>{$LN_usenet_secport}</th>
<th>{$LN_usenet_authentication}</th>
<th>{$LN_usenet_username}</th>
<th>{$LN_usenet_threads}</th>
<th>{$LN_usenet_connection}</th>
<th>{$LN_usenet_priority}</th>
<th>{$LN_usenet_status}</th>
<th>{$LN_usenet_posting}</th>
<th colspan="2">{$LN_usenet_actions}</th>
</tr>

{section name=x loop=$usenet_servers}

{capture assign="set_preferred"}
<input type="image" src="{$IMGDIR}/empty.png" name="set_preferred" value="{$LN_usenet_set_preferred}" class="noborder" onclick="javascript:usenet_action('set_preferred', {$usenet_servers[x]->id})" {popup text=$LN_usenet_set_preferred_msg|escape }/>
{/capture}

{capture assign="preferred"}
<input type="image" src="{$IMGDIR}/read.png" value="{$LN_usenet_preferred}" class="noborder" onclick="javascript:;" {popup text=$LN_usenet_preferred_msg|escape }/>
{/capture}

{capture assign="enable"}
<input type="image" src="{$IMGDIR}/light_red.png" name="enable" value="{$LN_usenet_enable}" class="noborder" onclick="javascript:usenet_action('enable_server',{$usenet_servers[x]->id})" {popup text=$LN_usenet_enable|escape } />
{/capture}
{capture assign="disable"}
<input type="image" src="{$IMGDIR}/light_green.png" name="disable" value="{$LN_usenet_disable}" class="noborder" onclick="javascript:usenet_action('disable_server',{$usenet_servers[x]->id})" {popup text=$LN_usenet_disable|escape }/>
{/capture}

{capture assign="posting"}
<input type="image" src="{$IMGDIR}/read.png" name="disable" value="{$LN_usenet_disable} {$LN_usenet_posting}" class="noborder" onclick="javascript:usenet_action('disable_posting',{$usenet_servers[x]->id})" {popup text="$LN_usenet_disable_posting $LN_usenet_posting"}/>
{/capture}
{capture assign="noposting"}
<input type="image" src="{$IMGDIR}/empty.png" name="enable" value="{$LN_usenet_enable} {$LN_usenet_posting}" class="noborder" onclick="javascript:usenet_action('enable_posting',{$usenet_servers[x]->id})" {popup text="$LN_usenet_enable $LN_usenet_posting" }/>
{/capture}


<tr class="{cycle values="even,odd" name="cycle1"}">

<td {popup text=$usenet_servers[x]->name|escape }>{$usenet_servers[x]->name|escape|truncate:$maxstrlen}</td>
<td {popup text=$usenet_servers[x]->hostname|escape }>{$usenet_servers[x]->hostname|escape|truncate:$maxstrlen}</td>
<td>{if $usenet_servers[x]->port neq 0}{$usenet_servers[x]->port|escape|truncate:$maxstrlen}{else}&nbsp;{/if}</td>
<td>{if $usenet_servers[x]->sec_port neq 0}{$usenet_servers[x]->sec_port|escape|truncate:$maxstrlen}{else}&nbsp;{/if}</td>
<td>{if $usenet_servers[x]->authentication eq 1}<img src="{$IMGDIR}/read.png" alt="{$LN_usenet_needsauthentication}" class="noborder" {popup text=$LN_usenet_needsauthentication }/>
{else}
	<img src="{$IMGDIR}/empty.png" class="noborder" alt=""/>
{/if}</td>
<td>{$usenet_servers[x]->username|escape|truncate:$maxstrlen}</td>
<td {popup text=$usenet_servers[x]->threads|escape }>{$usenet_servers[x]->threads|escape|truncate:$maxstrlen}</td>
<td {popup text=$usenet_servers[x]->connection|escape }>{$usenet_servers[x]->connection|escape|truncate:$maxstrlen}</td>
<td>{if $usenet_servers[x]->priority neq 0}{$usenet_servers[x]->priority|escape|truncate:$maxstrlen}{else}&nbsp;{/if}</td>
<td>{if $usenet_servers[x]->priority eq 0}{$enable}{else}{$disable}{/if}&nbsp;
{if $usenet_servers[x]->id eq $primary}{$preferred}{else}{$set_preferred}{/if}</td>
<td>{if $usenet_servers[x]->posting eq 1}{$posting}{else}{$noposting}{/if}</td>
<td>
<img src="{$IMGDIR}/icon_edit.png" alt="{$LN_users_edit}" {popup text=$LN_usenet_edit } class="noborder" onclick="javascript:edit_usenet_server({$usenet_servers[x]->id});"/>
<img src="{$IMGDIR}/icon_delete.png" alt="{$LN_users_delete}" {popup text=$LN_usenet_delete } class="noborder" onclick="javascript:usenet_action_confirm('delete_server',{$usenet_servers[x]->id}, '{$LN_delete} {$usenet_servers[x]->name|escape}?');" />
</td>
</tr>
{/section}
</table>
<div><br/></div>



